/******************************************************************************
* project: automatic_alarm_free_rtos_based
* chip: STM32F407VG
* compiler: arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.6.2
* 	20110921 (release) [ARM/embedded-4_6-branch revision 182083]
*
* prefix: (none)
*
* available global functions:
* 	spi_init(void)
* 	spi_write(uint32_t regdata)
* 	spi_read(uint32_t *regdata)
*
*
* available local functions:
*
*
* available interrupt handlers:
******************************************************************************/
#ifndef STM_SPI_H_
#define STM_SPI_H_

/*
+=============================================================================+
| includes
+=============================================================================+
*/
#include "stm32f4xx.h"
#include <stdint.h>

/*------------------------------------------------------------------------*//**
* \brief Configures and initialize ACC SPI.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
void acc_spi_init( void );

/*------------------------------------------------------------------------*//**
* \brief Read/wrie byte from/to SPI.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
uint16_t acc_spi_transfer(SPI_TypeDef* mySPI, uint16_t data);

/*------------------------------------------------------------------------*//**
* \brief Configures and initialize SDcard SPI.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
void sdcard_spi_init(void);

/*------------------------------------------------------------------------*//**
* \brief Read/wrie byte from/to SPI.
* \details
*
* \param [in] void
*//*-------------------------------------------------------------------------*/
uint8_t sdcard_spi_transfer(SPI_TypeDef* mySPI, uint8_t data);


#endif /* STM_USART_H_ */
